<?php
namespace BP\Sys;

use BP\En\EntityMyPK;

require_once("BP/En/Map.php");
class FrmImgAth extends EntityMyPK {
	public function getName () 
	{
		return $this->GetValStringByKey(FrmImgAthAttr::$Name);
	}
	public function setName ($value) // [String value]
	{
		$this->SetValByKey(FrmImgAthAttr::$Name, $value);
	}
	public function getCtrlID () 
	{
		return $this->GetValStringByKey(FrmImgAthAttr::$CtrlID);
	}
	public function setCtrlID ($value) // [String value]
	{
		$this->SetValByKey(FrmImgAthAttr::$CtrlID, $value);
	}
	public function getY () 
	{
		return $this->GetValFloatByKey(FrmImgAthAttr::$Y);
	}
	public function setY ($value) // [float value]
	{
		$this->SetValByKey(FrmImgAthAttr::$Y, $value);
	}
	public function getX () 
	{
		return $this->GetValFloatByKey(FrmImgAthAttr::$X);
	}
	public function setX ($value) // [float value]
	{
		$this->SetValByKey(FrmImgAthAttr::$X, $value);
	}
	public function getH () 
	{
		return $this->GetValFloatByKey(FrmImgAthAttr::$H);
	}
	public function setH ($value) // [float value]
	{
		$this->SetValByKey(FrmImgAthAttr::$H, $value);
	}
	public function getW () 
	{
		return $this->GetValFloatByKey(FrmImgAthAttr::$W);
	}
	public function setW ($value) // [float value]
	{
		$this->SetValByKey(FrmImgAthAttr::$W, $value);
	}
	public function getFK_MapData () 
	{
		return $this->GetValStrByKey(FrmImgAthAttr::$FK_MapData);
	}
	public function setFK_MapData ($value) // [String value]
	{
		$this->SetValByKey(FrmImgAthAttr::$FK_MapData, $value);
	}
	public function getIsEdit () 
	{
		return $this->GetValBooleanByKey(FrmImgAthAttr::$IsEdit);
	}
	public function setIsEdit ($value) // [boolean value]
	{
		$this->SetValByKey(FrmImgAthAttr::$IsEdit, $value);
	}
	public function getIsRequired () 
	{
		return $this->GetValBooleanByKey(FrmImgAthAttr::$IsRequired);
	}
	public function setIsRequired ($value) // [boolean value]
	{
		$this->SetValByKey(FrmImgAthAttr::$IsRequired, $value);
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($mypk) // [String mypk]
	{
		$me = new self();
		$me->setMyPK($mypk);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("Sys_FrmImgAth", "图片附件");
		$map->Java_SetDepositaryOfEntity($Depositary->None);
		$map->Java_SetDepositaryOfMap($Depositary->Application);
		$map->Java_SetEnType($EnType->Sys);
		$map->IndexField = FrmImgAttr::$FK_MapData;
		$map->AddMyPK();
		$map->AddTBString(FrmImgAthAttr::$FK_MapData, NULL, "表单ID",  TRUE ,  FALSE , 1, 100, 20);
		$map->AddTBString(FrmImgAthAttr::$CtrlID, NULL, "控件ID",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBString(FrmImgAthAttr::$Name, NULL, "中文名称",  TRUE ,  FALSE , 0, 200, 20);
		$map->AddTBFloat(FrmImgAthAttr::$X, 5, "X",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmImgAthAttr::$Y, 5, "Y",  FALSE ,  FALSE );
		$map->AddTBFloat(FrmImgAthAttr::$H, 200, "H",  TRUE ,  FALSE );
		$map->AddTBFloat(FrmImgAthAttr::$W, 160, "W",  FALSE ,  FALSE );
		$map->AddTBInt(FrmImgAthAttr::$IsEdit, 1, "是否可编�?",  TRUE ,  TRUE );
		$map->AddTBInt(FrmImgAthAttr::$IsRequired, 0, "是否必填�?",  TRUE ,  TRUE );
		$map->AddTBString(MapAttrAttr::$GUID, NULL, "GUID",  TRUE ,  FALSE , 0, 128, 20);
		$this->set_enMap($map);
		return $this->get_enMap();
	}
	protected function beforeUpdateInsertAction () 
	{
		$this->setMyPK((($this->getFK_MapData() . "_") . $this->getCtrlID()));
		return parent->beforeUpdateInsertAction();
	}
}
?>
